import SideMenu from "./computed/SideMenu";
import "./output.css";
import Master from "./computed/Master";
import Alert404 from "./tools/Alert404";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import UserList from "./computed/UserList";
import Content from "./computed/Content"; 
import PrivateRoute from "./tools/PricvateRoute";
import Login from "./computed/Login";
import ModelList from "./computed/ModelList";
import CorpusList from "./computed/CorpusList";
import CourseList from "./computed/CourseList";
import User from "./computed/User";

export default function App() {
  return (
    <div className="flex flex-row bg-gray-100 min-h-screen">

      <BrowserRouter >
        {/* 固定的侧边栏 */}
        

        {/* 主内容区 */}
        
          
          <Routes>
            {/* 定义路由 */}
            <Route path="*" element={
              
              <Alert404 />
            
              } />
            <Route path="/" element={
              <PrivateRoute>
                <Content>
                <SideMenu />
                <Master />
                </Content>
              </PrivateRoute>
              } />

            <Route path="/user" element={
              <PrivateRoute>
              <Content>
              <SideMenu />
              <User />
              </Content>
            </PrivateRoute>
            } >
            
            </Route>
            <Route path="/user/list" element={
              <PrivateRoute>
              <Content>
              <SideMenu />
              <UserList />
              </Content>
              </PrivateRoute>
              } />
            <Route path="/model/list" element={
              <PrivateRoute>
                <Content>
                  <SideMenu />
                  <ModelList />
                </Content>
              </PrivateRoute>
            } />

            <Route path="/model/corpus"
            element={
            <PrivateRoute>
                <Content>
                  <SideMenu />
                  <CorpusList />
                </Content>
              </PrivateRoute>}
            />

            <Route path="/course/list"
            element={
            <PrivateRoute>
                <Content>
                  <SideMenu />
                  <CourseList />
                </Content>
              </PrivateRoute>}
            />
            <Route path="/login" element={<Login />} />
          </Routes>
      </BrowserRouter>
    </div>
  );
}